import http from "@/config/config";


const orderApi ={
  
 //默认的分页查询，无条件
 getOrders:(page:Number,size:Number)=>{
    return http.post(`/order/page/${page}/${size}`,{

    }).then(res=>{
      return res.data
    })
 },
 //根据订单号查询订单
 getByOrderId:(page:Number,size:Number,orderId:Number)=>{
   return http.post(`/order/page/${page}/${size}`,{
        "orderId":orderId
   }).then(res=>{
      return res.data;
   })
 },
 //根据日期查询订单
 getByDate:(page:Number,size:Number,date:String)=>{
    return http.post(`/order/page/${page}/${size}`,{
      "date":date
 }).then(res=>{
    return res.data;
 })
 }


}

export default orderApi;

